package com.shenmazong.demodelayqueuetask.task;

import lombok.extern.slf4j.Slf4j;
import org.springframework.scheduling.annotation.EnableScheduling;
import org.springframework.scheduling.annotation.Scheduled;
import org.springframework.stereotype.Component;

import java.time.LocalDateTime;
import java.time.LocalTime;
import java.time.format.DateTimeFormatter;

/**
 * @program: server-java-demo
 * @description: OrderTask
 * @author: 亮子说编程
 * @create: 2020-11-02 14:59
 **/

@Slf4j
@Component
@EnableScheduling
public class OrderTask {

    @Scheduled(fixedRate = 5000)
    public void doTask() {
        //System.out.println(LocalDateTime.now().format(DateTimeFormatter.ofPattern("yyyy-MM-dd HH:mm:ss")));
    }
}
